package com.zzyl.controller;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.service.NursingProjectService;
import com.zzyl.vo.NursingProjectVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/nursing_project")
@Api(tags = "护理项目相关接口")
public class NProjectController {
    @Autowired
    private NursingProjectService nursingProjectService;

    @GetMapping
    @ApiOperation("分页条件查询护理项目")
    public ResponseResult getAllNProjects( String name, Integer status, Integer pageNum, Integer pageSize) {
        PageResponse<NursingProjectVo> allNProjects = nursingProjectService.getAllNProjects(name, status, pageNum, pageSize);

        return ResponseResult.success(allNProjects);
    }
}
